<?php
require_once 'AttendeeView.php';

class EditView {

	private $AttendeeView;

	function __construct() {
		$this -> AttendeeView = new AttendeeView();
	}

	/**
	 * @param $AttendeeArray
	 */
	public function getListHTML($AttendeeArray) {
		echo "<p>haha, comic sans, fuck you</p>";
		$completeList ="<a href='./Register.php'>Registrera ny deltagare</a>" . "<ul>";
		foreach ($AttendeeArray as $a) {
			$tempList = "<li>";
			//Alla saker från nollan ska in här, inte bara namn och pers.nummer
			$tempList .="<p>" . 
						"Namn : " . $a -> firstName . " " . $a -> lastName . 
						"<br>" . $a -> overallInfo -> datePaid . 
						"</p>";
			$tempList .= "</li>";
			$completeList .= $tempList;
		}
		$completeList .= "<ul>";
		//echo date_format(new DateTime(NULL, new DateTimeZone('CET')), "Ymd");
		return $completeList;
	}

	public function getEditHTML() {
		return "edit";
	}

}
